import request from '@/utils/request'

// 登录
export function tenantLogin(data) {
  return request({
    url: '/tenant/security/auth/login',
    method: 'post',
    data
  })
}

// 二次校验登录
export function tenantCheckAgain(token) {
  return request({
    url: '/tenant/auth/tenantCheckAgain',
    method: 'post',
    params: { token }
  })
}

// 获取商家信息
export function tenantDetail(data) {
  return request({
    url: '/tenant',
    method: 'get',
    data
  })
}

// 创建店铺
export function create(data) {
  return request({
    url: '/shop/create',
    method: 'post',
    data
  })
}

// 创建店铺
export function list(data) {
  return request({
    url: '/shop/list',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}
